Math.lerp Method

Returns the value that corresponds to the linear interpolation parameter t.
 
 
Static This method is static.

Parameters

a

Type: Number
The value to interpolate from.
b

Type: Number
The value to interpolate to.
t

Type: Number
Linear interpolation parameter.

Return Value


Type: Number
The interpolated value. 

Remarks

Performs linear interpolation for values in the domain [0, 1] to the range [a, b]. That is, given the points (0, a) and (1, b) this solves for y in the point (t, y).